package com.fenghongzhang.day007.search;

import android.view.View;
import android.widget.TextView;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.fenghongzhang.day007.R;

import java.util.List;

public class RvAdapter extends BaseQuickAdapter<Search, BaseViewHolder> {
    public RvAdapter(int layoutResId, @Nullable List<Search> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, Search item) {
        TextView view = helper.getView(R.id.search_rv_tv);
        view.setText(item.getTitle());
        helper.addOnClickListener(R.id.search_rv_img);
    }
}
